//----------------------------------------------------------------------
// XmlInterpreter.h:
//   Declaration of functions to interprete XML element tree
//
//          Copyright (C) 2020-2029 by Jun Mo, All rights reserved.
//
//----------------------------------------------------------------------

#ifndef __XML_INTERPRETER_H__
#define __XML_INTERPRETER_H__

#include "XmlElement.h"
#include "Trajectory.h"

enum OutputType { OutputTypePosition, OutputTypeObservation, OutputTypeBaseband, OutputTypeIfSignal };
enum OutputFormat { OutputFormatEcef, OutputFormatLla, OutputFormatNmea, OutputFormatRinex };

typedef struct
{
	char filename[256];
	OutputType Type;
	OutputFormat Format;
	unsigned long GpsMaskOut;
	unsigned long GlonassMaskOut;
	unsigned long long BdsMaskOut;
	unsigned long long GalileoMaskOut;
	double ElevationMask;
	double Interval;
} OUTPUT_PARAM, *POUTPUT_PARAM;

BOOL AssignStartTime(CXmlElement *Element, UTC_TIME &UtcTime);
BOOL SetTrajectory(CXmlElement *Element, LLA_POSITION &StartPos, LOCAL_SPEED &StartVel, CTrajectory &Trajectory);
BOOL SetOutputParam(CXmlElement *Element, OUTPUT_PARAM &OutputParam);

#endif // __XML_INTERPRETER_H__
